<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
window.onresize = function (e) {
  let withs = document.body.clientWidth; // 获取可视区宽度
  let Heights = document.body.clientHeight; // 获取可视区宽度
  if (withs > 1200) {
    // 判断可视区宽度如果小于1200 就不再缩放
    let designSize = 1920; // 设计图尺寸
    let html = document.documentElement;
    let wW = html.clientWidth; // 窗口宽度
    let rem = (wW * 100) / designSize;
    document.documentElement.style.fontSize = rem + "px";
  }
};
export default {
  name: "App",
  components: {},
  data() {
    return {
      pcStatus: true, //是否是pc端的
    };
  },
  methods: {
    goPAGE() {
      if (
        navigator.userAgent.match(
          /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
        )
      ) {
        window.location.href = "";
      } else {
      }
    },
    Rem() {
      let designSize = 1920; // 设计图尺寸
      let html = document.documentElement;
      let wW = html.clientWidth; // 窗口宽度
      let rem = (wW * 100) / designSize;
      document.documentElement.style.fontSize = rem + "px";
    },
  },
  created: function () {
    // this.Rem()
    window.addEventListener("resize", this.Rem());
    // this.goPAGE()
    // this.changeSize();  //执行根据尺寸适配
    // this.getPcStatus();  //判断pc状态
    if (localStorage.getItem("userdata")) {
      this.$store.commit(
        "onuserdata",
        JSON.parse(localStorage.getItem("userdata"))
      );
      this.$store.state.loginstate = true;
    } else {
      this.$store.state.loginstate = false;
    }
  },
};
</script>
<style lang="less">
@import "@/utils/index.less";

.el-dialog__header {
  padding: 0 !important;
}

.el-dialog__body {
  padding: 0 !important;
}

body {
  padding: 0;
  margin: 0;
  cursor: default;
  font-family: PingFang SC;
  font-weight: 500;
  color: #333333;
}

input,
textarea {
  width: 100%;
  height: 100%;
  font-size: 14px;
  color: #333333;
  outline: none;
  border: none;
  background-color: rgba(0, 0, 0, 0);
  padding: 0;
}

.box-view {
  width: 1200px;
  margin: 0 auto;
}

.bold {
  font-weight: bold;
}

.notColor {
  color: #999999 !important;
}

.text-orange {
  //桔橙
  color: #fc9d27 !important;
}

.bg-orange {
  background-color: #fc9d27 !important;
}

.text-white {
  //白色
  color: #fff !important;
}

.bg-white {
  background-color: #fff !important;
}

.pop-btn-view {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: center;

  div {
    width: 200px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: #68b0ff;
    border-radius: 10px;
    font-size: 24px;
    font-family: PingFang SC;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
  }
}
/* 可能用得到的element样式修改 */
.selected,
.today > div > span,
.available:hover,
.is-checked > .el-radio__label,
.el-loading-text,
.el-dropdown-menu__item:focus,
.el-dropdown-menu__item:not(.is-disabled):hover,
.el-checkbox__input.is-checked + .el-checkbox__label {
  color: #fc9d27 !important;
}

.start-date > div > span,
.end-date > div > span,
.is-checked > .el-radio__inner,
.is-checked > .el-checkbox__inner,
.current > div > span {
  background-color: #fc9d27 !important;
}

.el-input__inner:focus,
.is-active,
.is-active:hover,
.el-select > .el-input__inner,
.el-textarea__inner:focus,
.is-checked > .el-radio__inner,
.el-checkbox__inner {
  border-color: #fc9d27 !important;
}

.el-divider--horizontal {
  margin: 0 !important;
}
</style>
